const chalk = require("chalk");

const package = require("../package.json");
const projectList = require("../project.json");

module.exports = function (program) {
    program
        .command("list")
        .description("展示所有的类型")
        .action(function () {
            console.log(chalk.green("列表中的项目可以自定义安装，如果需要增加可以在git中提交新的分支。"));
            console.log(chalk.green(package.repository.url) + "\r\n");
            console.log(chalk.green("作者     ", "项目"));
            for (const key in projectList) {
                console.log(chalk.green(projectList[key].auth, key));
            }
            console.log("\r");
        });
};
